/*
 * job.cpp
 *
 *  Created on: Jun 22, 2011
 *      Author: Gilad & Yotam
 */
#include "job.h"

void Job::validatePriority(int priority) {
	if ((priority < 0) || (priority > 100)) {
		throw Job::InvalidJobPriority();
	}
}
Job::Job(int id, int priority, const Matrix& a, const Matrix& b) :
	id(id), priority(priority), a(a), b(b) {
	validatePriority(priority);
}

Job::~Job(){
}

void Job::changePriority(int newPriority) {
	validatePriority(newPriority);
	priority = newPriority;
}
int Job::getId() {
	return id;
}
int Job::getPriority() {
	return priority;
}
